<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<meta name="robots" content="NOINDEX, NOFOLLOW" /> <!-- Prevent indexing by search engines -->
<title>Compute Library: Profiler Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script type="text/javascript" src="http://cdn.mathjax.org/mathjax/latest/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Compute Library
   &#160;<span id="projectnumber">18.03</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.xhtml"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.xhtml"><span>Related&#160;Pages</span></a></li>
      <li><a href="namespaces.xhtml"><span>Namespaces</span></a></li>
      <li class="current"><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.xhtml"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.xhtml"><span>Data&#160;Structures</span></a></li>
      <li><a href="classes.xhtml"><span>Data&#160;Structure&#160;Index</span></a></li>
      <li><a href="inherits.xhtml"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.xhtml"><span>Data&#160;Fields</span></a></li>
    </ul>
  </div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Profiler Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml" title="Profiler class to collect benchmark numbers. ">Profiler</a> class to collect benchmark numbers.  
 <a href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_profiler_8h_source.xhtml">Profiler.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a20bb995bb0d5415692917b2f9a36f948"><td class="memItemLeft" align="right" valign="top">using&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a20bb995bb0d5415692917b2f9a36f948">MeasurementsMap</a> = std::map&lt; std::string, std::vector&lt; <a class="el" href="structarm__compute_1_1test_1_1framework_1_1_measurement.xhtml">Measurement</a> &gt;&gt;</td></tr>
<tr class="memdesc:a20bb995bb0d5415692917b2f9a36f948"><td class="mdescLeft">&#160;</td><td class="mdescRight">Mapping from instrument ids to their measurements.  <a href="#a20bb995bb0d5415692917b2f9a36f948">More...</a><br /></td></tr>
<tr class="separator:a20bb995bb0d5415692917b2f9a36f948"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a9a2cd15d64a87642898d68b060a5afa9"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a9a2cd15d64a87642898d68b060a5afa9">add</a> (std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_instrument.xhtml">Instrument</a> &gt; instrument)</td></tr>
<tr class="memdesc:a9a2cd15d64a87642898d68b060a5afa9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Add <code>instrument</code> to the performance monitor.  <a href="#a9a2cd15d64a87642898d68b060a5afa9">More...</a><br /></td></tr>
<tr class="separator:a9a2cd15d64a87642898d68b060a5afa9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a60de64d75454385b23995437f1d72669"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a60de64d75454385b23995437f1d72669">start</a> ()</td></tr>
<tr class="memdesc:a60de64d75454385b23995437f1d72669"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start all added instruments to measure performance.  <a href="#a60de64d75454385b23995437f1d72669">More...</a><br /></td></tr>
<tr class="separator:a60de64d75454385b23995437f1d72669"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8c528baf37154d347366083f0f816846"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a8c528baf37154d347366083f0f816846">stop</a> ()</td></tr>
<tr class="memdesc:a8c528baf37154d347366083f0f816846"><td class="mdescLeft">&#160;</td><td class="mdescRight">Stop all added instruments.  <a href="#a8c528baf37154d347366083f0f816846">More...</a><br /></td></tr>
<tr class="separator:a8c528baf37154d347366083f0f816846"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a89d7c3c7bab828a9e87e23b269935ee4"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a20bb995bb0d5415692917b2f9a36f948">MeasurementsMap</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a89d7c3c7bab828a9e87e23b269935ee4">measurements</a> () const </td></tr>
<tr class="memdesc:a89d7c3c7bab828a9e87e23b269935ee4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return measurements for all instruments.  <a href="#a89d7c3c7bab828a9e87e23b269935ee4">More...</a><br /></td></tr>
<tr class="separator:a89d7c3c7bab828a9e87e23b269935ee4"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml" title="Profiler class to collect benchmark numbers. ">Profiler</a> class to collect benchmark numbers. </p>
<p>A profiler manages multiple instruments that can collect different types of benchmarking numbers. </p>

<p>Definition at line <a class="el" href="_profiler_8h_source.xhtml#l00045">45</a> of file <a class="el" href="_profiler_8h_source.xhtml">Profiler.h</a>.</p>
</div><h2 class="groupheader">Member Typedef Documentation</h2>
<a class="anchor" id="a20bb995bb0d5415692917b2f9a36f948"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">using <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a20bb995bb0d5415692917b2f9a36f948">MeasurementsMap</a> =  std::map&lt;std::string, std::vector&lt;<a class="el" href="structarm__compute_1_1test_1_1framework_1_1_measurement.xhtml">Measurement</a>&gt;&gt;</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Mapping from instrument ids to their measurements. </p>

<p>Definition at line <a class="el" href="_profiler_8h_source.xhtml#l00049">49</a> of file <a class="el" href="_profiler_8h_source.xhtml">Profiler.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a9a2cd15d64a87642898d68b060a5afa9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void add </td>
          <td>(</td>
          <td class="paramtype">std::unique_ptr&lt; <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_instrument.xhtml">Instrument</a> &gt;&#160;</td>
          <td class="paramname"><em>instrument</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Add <code>instrument</code> to the performance monitor. </p>
<p>All added instruments will be used when <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a60de64d75454385b23995437f1d72669">start</a> or <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a8c528baf37154d347366083f0f816846">stop</a> are called to make measurements.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">instrument</td><td><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_instrument.xhtml" title="Interface for classes that can be used to measure performance. ">Instrument</a> to be used to measure performance. </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="_profiler_8cpp_source.xhtml#l00035">35</a> of file <a class="el" href="_profiler_8cpp_source.xhtml">Profiler.cpp</a>.</p>

<p>Referenced by <a class="el" href="_framework_8cpp_source.xhtml#l00573">Framework::get_profiler()</a>.</p>
<div class="fragment"><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;{</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;    _instruments.emplace_back(std::move(instrument));</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a89d7c3c7bab828a9e87e23b269935ee4"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml#a20bb995bb0d5415692917b2f9a36f948">Profiler::MeasurementsMap</a> &amp; measurements </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return measurements for all instruments. </p>

<p>Definition at line <a class="el" href="_profiler_8cpp_source.xhtml#l00064">64</a> of file <a class="el" href="_profiler_8cpp_source.xhtml">Profiler.cpp</a>.</p>

<p>Referenced by <a class="el" href="_framework_8cpp_source.xhtml#l00253">Framework::error_on_missing_assets()</a>, and <a class="el" href="main_8cpp_source.xhtml#l00063">main()</a>.</p>
<div class="fragment"><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;{</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    <span class="keywordflow">return</span> _measurements;</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a60de64d75454385b23995437f1d72669"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void start </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start all added instruments to measure performance. </p>

<p>Definition at line <a class="el" href="_profiler_8cpp_source.xhtml#l00040">40</a> of file <a class="el" href="_profiler_8cpp_source.xhtml">Profiler.cpp</a>.</p>

<p>Referenced by <a class="el" href="_framework_8cpp_source.xhtml#l00253">Framework::error_on_missing_assets()</a>, and <a class="el" href="main_8cpp_source.xhtml#l00063">main()</a>.</p>
<div class="fragment"><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;{</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keywordflow">for</span>(<span class="keyword">auto</span> &amp;instrument : _instruments)</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    {</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;        instrument-&gt;start();</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;    }</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="a8c528baf37154d347366083f0f816846"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void stop </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Stop all added instruments. </p>

<p>Definition at line <a class="el" href="_profiler_8cpp_source.xhtml#l00048">48</a> of file <a class="el" href="_profiler_8cpp_source.xhtml">Profiler.cpp</a>.</p>

<p>Referenced by <a class="el" href="_framework_8cpp_source.xhtml#l00253">Framework::error_on_missing_assets()</a>, and <a class="el" href="main_8cpp_source.xhtml#l00063">main()</a>.</p>
<div class="fragment"><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;{</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <span class="keywordflow">for</span>(<span class="keyword">auto</span> &amp;instrument : _instruments)</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        instrument-&gt;stop();</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    }</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> &amp;instrument : _instruments)</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    {</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        <span class="keywordflow">for</span>(<span class="keyword">const</span> <span class="keyword">auto</span> &amp;measurement : instrument-&gt;measurements())</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        {</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;            _measurements[instrument-&gt;id() + <span class="stringliteral">&quot;/&quot;</span> + measurement.first].push_back(measurement.second);</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        }</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    }</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>tests/framework/<a class="el" href="_profiler_8h_source.xhtml">Profiler.h</a></li>
<li>tests/framework/<a class="el" href="_profiler_8cpp_source.xhtml">Profiler.cpp</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespacearm__compute.xhtml">arm_compute</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test.xhtml">test</a></li><li class="navelem"><a class="el" href="namespacearm__compute_1_1test_1_1framework.xhtml">framework</a></li><li class="navelem"><a class="el" href="classarm__compute_1_1test_1_1framework_1_1_profiler.xhtml">Profiler</a></li>
    <li class="footer">Generated on Fri Mar 2 2018 12:38:00 for Compute Library by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.11 </li>
  </ul>
</div>
</body>
</html>
